package com.bw.ppjokeplay.mvvm.model

import com.bw.ppjokeplay.common.entity.BaseEntity
import com.bw.ppjokeplay.common.mvvm.model.BaseModel
import com.bw.ppjokeplay.common.network.Api
import com.bw.ppjokeplay.common.network.ApiService
import com.bw.ppjokeplay.mvvm.model.entity.HomeFeedEntity
import io.reactivex.Observable

class HomeListModel : BaseModel() {

    fun requestHomeList(feedId : Int,
                        feedType:String,
                        pageCount:Int,
                        userId:Int):Observable<BaseEntity>?{
        val homeOB : Observable<HomeFeedEntity> =
            ApiService.instance().getRetrofit()!!.
            create(Api::class.java).
            requestHomeList(feedId,feedType,pageCount,userId)
        return changeFun(homeOB)
    }

}